//@author A0096950U
#include "Action.h"

Action::Action(CommandType command, Task currentTask) {
	this->command = command;
	this->previousTask = NULL;
	this->currentTask = new Task(currentTask);
}

Action::Action(CommandType command, Task currentTask, Task previousTask) {
	this->command = command;
	this->previousTask = new Task(previousTask);
	this->currentTask = new Task(currentTask);
}

CommandType Action::getCommandType() const {
	return command;
}

Task Action::getPreviousTask() const {
	return *previousTask;
}

Task Action::getCurrentTask() const {
	return *currentTask;
}